//
//  GSTitleLabel.m
//  GameSky
//
//  Created by lanou on 16/1/11.
//  Copyright © 2016年 NiRongfei. All rights reserved.
//

#import "GSTitleLabel.h"

@implementation GSTitleLabel

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.userInteractionEnabled = YES;
        self.textColor = [UIColor whiteColor];
        self.font = [UIFont systemFontOfSize:18];
        self.textAlignment = NSTextAlignmentCenter;
        
        self.scale = 0.0;
    }
    return self;
}

// 重写设置比例的set方法
- (void)setScale:(CGFloat)scale
{
    _scale = scale;
    // 最小比例
    CGFloat minScale = 0.8;
    // 当前比例
    CGFloat currentScale = minScale + (1 - minScale) * scale;
    // 按比例缩放;
    self.transform = CGAffineTransformMakeScale(currentScale, currentScale);
}

@end
